[//
    async function( kuo,Context,context){
        let LANG = this.LANG();
        let $DATA = Object.assign({},this.$DATA);
        let $hash = 'safetoken/'+kuo.adminid;
        $DATA.token = Mode("Tools").Uuid();
        await Mem.Set($hash,$DATA.token);
        let  $kongzhi = kuo.Path.length > 0?kuo.Path[kuo.Path.length-1]:"get";
        let  $db = await db('features');
        let  $_GET = kuo.get;
        let  $_POST = kuo.post;
        let  $chushi = true; 
        let  $features = await Kuoplus(kuo.class);
        if($kongzhi == 'get'){
    
            let $page = Mode("Tools").Int($_GET['page']?$_GET['page']:1);
            let $limitx  =  Mode("Tools").Int($_GET['limit']?$_GET['limit']:10);
            if($limitx < 10 ){
                $limitx = 10;
            }else if($limitx > 100 ){
                $limitx = 100;
            }
            let $where ={};
            let $data  = await $db.Where($where).Limit($limitx,$page).Select();
            let $total = await $db.Where($where).Total();
            if(!$data){
                $data= [];
            }else{
                for( var $id in $data){
                    $data[$id]['configure'] = json_decode($data[$id]['configure']);
                    $data[$id]['menuconfig'] = json_decode($data[$id]['menuconfig']);
                }
            }

            $DATA.code = 0;
            $DATA.count = $total;
            if($page == 1 && $chushi){
                $DATA.off = $features['configure']['off2'];
            }
            $DATA.data = $data;
    
        }else if($kongzhi == 'put'){
            let $id = Mode("Tools").Int($_POST['id']?$_POST['id']:0);
            let $data = await $db.Where({id: $id}).Find();
            if(!$data){
                $DATA.code = -1;
                $DATA.msg = LANG.admin_id_no;
                Context.body = JSON.stringify($DATA);
                return ;
            }
            let $update = {
                'off':Mode("Tools").Int($_POST['off']),
                'authorizedkey':Mode("Tools").Xss($_POST['authorizedkey']),
            };
            $update['name'] = Mode("Tools").Xss($_POST['name']);
            $update['typeico'] = Mode("Tools").Xss($_POST['typeico']);
            $update['type'] = Mode("Tools").Xss($_POST['type']);
            $update['callfunction'] = Mode("Tools").Xss($_POST['callfunction']);
            $update['authorizedid'] = Mode("Tools").Xss($_POST['authorizedid']);
            $update['authorizedkey'] = Mode("Tools").Xss($_POST['authorizedkey']);
            $update['display'] = Mode("Tools").Int($_POST['display']);
            $update['main'] = Mode("Tools").Int($_POST['main']);
         
            let $configure = {};
      
            for(let $k in $_POST ){
                if( strpos(  $k, "configure_") !== false){
                    $k = str_replace(['\\[','\\]'],['_',''],$k);
                    let $zuhe = explode('_',$k);
                    $configure[$zuhe['1']] =  $_POST[$k];
                }
            }
            $update['menuconfig'] =  $_POST["menuconfig"];
            $update['configure'] = json_encode($configure);
            let $fan = await $db.Where({id: $id}).Update($update);
            if($fan){
                await Kuoplus($data['pluginid'],1);
                await Kuolog('adminlog',kuo.adminid,3,{'yuan':$data,'data':$update},kuo.func_,kuo.class,kuo.ip);
                $update['configure'] = $configure;
                $update['menuconfig'] = json_decode($update['menuconfig']);
                $DATA.data = $update;
                $DATA.code =1;
                $DATA.msg = LANG.put_ok;
            }else{
                $DATA.code =-1;
                $DATA.msg = LANG.put_no;
            }
    
        }else if($kongzhi == 'add'){

            if( isset($_POST['beninstall']) ){
                $_POST['beninstall'] = strtolower(Trim(($_POST['beninstall']?$_POST['beninstall']:"")));
                if($_POST['beninstall'] == "" ){
                    $DATA.code = -1;
                    $DATA.msg = LANG.admin_features_shuru;
                    Context.body = JSON.stringify($DATA);
                    return ;
                }
                let $data = await $db.Where({'pluginid':$_POST['beninstall']}).Find();
                if($data ){
                    $DATA.code = -1;
                    $DATA.msg = LANG.admin_features_you;
                    Context.body = JSON.stringify($DATA);
                    return ;
                }
                if(global['Kuo_'+$_POST ['beninstall']]){
                    if(global['Kuo_'+$_POST ['beninstall']].InStall){
                        await  Mem.Flush("db/");
                        let fan = await global['Kuo_'+$_POST ['beninstall']].InStall(MYSQLconfig.prefix);  
                        if(fan === true){
                            await Kuoplus($_POST['beninstall'],2);
                            $DATA.code = 1;
                            $DATA.msg = LANG.admin_features_ok;
                        }else  if(fan){
                            $DATA.code = -1;
                            $DATA.msg = fan;
                        }else{
                            $DATA.msg = LANG.admin_features_noin;
                            $DATA.code = -1;
                        }

                    }else{
                        $DATA.msg = LANG.admin_features_Install;
                        $DATA.code = -1;
                    }
                    
                }else{
                    $DATA.msg = LANG.admin_features_no;
                    $DATA.code = -1;
                }
                Context.body = JSON.stringify($DATA);
                return ;
            }

            $_POST['pluginid'] = strtolower(Trim(($_POST['pluginid']?$_POST['pluginid']:"")));
            let $data = await $db.Where({'pluginid':$_POST['pluginid']}).Find();
            if( $_POST['pluginid'] == "" || $data ){
                $DATA.code = -1;
                $DATA.msg = LANG.admin_features_you;
                Context.body = JSON.stringify($DATA);
                return ;
            }
            let $insert = {
                'atime':Mode("Tools").Time(),
                'pluginid':Mode("Tools").Xss($_POST['pluginid']),
                'name':Mode("Tools").Xss($_POST['name']),
                'describes':Mode("Tools").Xss($_POST['describes']),
                'type':Mode("Tools").Xss($_POST['type']),
                'typeico':Mode("Tools").Xss($_POST['typeico']),
                'author':Mode("Tools").Xss($_POST['author']),
                'authorlink':Mode("Tools").Xss($_POST['authorlink']),
                'version':Mode("Tools").Xss($_POST['version']),
                'branch':Mode("Tools").Xss($_POST['branch']),
                'off':Mode("Tools").Xss($_POST['off']),
                'authorizedid':Mode("Tools").Xss($_POST['authorizedid']),
                'authorizedkey':Mode("Tools").Xss($_POST['authorizedkey']),
                'display':Mode("Tools").Xss($_POST['display']),
                'callfunction':Mode("Tools").Xss($_POST['callfunction']),
                'main':Mode("Tools").Int($_POST['main'])
            };
            let $configure = {};
           
            for(let $k in $_POST ){
                if( strpos(  $k, "configure_") !== false){
                    $k = str_replace(['\\[','\\]'],['_',''],$k);
                    $zuhe = explode('_',$k);
                    $configure[$zuhe['1']] =  $_POST[$k];
                }
            }
            $insert['menuconfig'] =  $_POST["menuconfig"];
            $insert['configure'] = json_encode($configure);
            let $fan =await $db.Insert($insert);
            if($fan){
                $DATA.code = 1;
                $DATA.msg = LANG.add_ok;
                await Kuolog('adminlog',kuo.adminid,4, $insert ,kuo.func_,kuo.class,kuo.ip);
            }else{
                $DATA.code = -1;
                $DATA.msg = LANG.add_no;
            }
    
        }else if($kongzhi == 'del'){
    
            let $id = Mode("Tools").Int($_POST['id']?$_POST['id']:0);
            let $data = await $db.Where({id: $id}).Find();
    
            if(!$data){
                $DATA.code = -1;
                $DATA.msg = LANG.admin_id_no;
                Context.body = JSON.stringify($DATA);
                return ;
            }
    
            if($data ['pluginid'] == 'admin'){

                $DATA.code = -1;
                $DATA.msg = LANG.admin_features_exit;
                Context.body = JSON.stringify($DATA);
                return ;
            }

            if(global['Kuo_'+$data ['pluginid']]){
                $DATA.code = -1;
                $DATA.msg = LANG.admin_features_file;
                Context.body = JSON.stringify($DATA);
                return ;
            }
    
            let $fan = await $db.Where({id: $id}).Delete();
            if($fan){
               
                await Kuolog('adminlog',kuo.adminid,5, $data ,kuo.func_,kuo.class,kuo.ip);
                $DATA.code = 1;
                $DATA.msg = LANG.del_ok;
            }else{
                $DATA.code = -1;
                $DATA.msg = LANG.del_no;
            }
        }
        Context.body = JSON.stringify($DATA);
    }
]